<template>
    <div class="wrapper">
        <h1>MyHooks</h1>
        <GlobalHello />
        全局属性：{{ appVersion }}
        <h2>{{ sum }}，放大10倍 {{ bigSum }}</h2>
        <button @click="add">+1</button>
        <hr />
        <img v-for="(dog, index) in dogList" :src="dog" :key="index"><br />
        <button :disabled="disabled" @click="addLog">加狗</button>
    </div>
</template>

<script lang="ts" setup name="MyHooks">
import useSum from '@/hooks/useSum'
import useDog from '@/hooks/useDog'

const { sum, bigSum, add } = useSum()
const { dogList, disabled, addLog } = useDog()

</script>


<style scoped>
.wrapper {
    background-color: skyblue;
    box-shadow: 0 0 10px;
    border-radius: 10px;
    padding: 20px;
    margin: 20px
}

img {
    height: 100px;
    margin-right: 10px;
}

button {
    margin: 0 5px;
}
</style>